1. Field of the Invention
The invention relates generally to the field of three dimensional machine vision, and more particularly, it relates to a three dimensional vision device and method for mapping a three dimensional surface faster and more accurately than previously thought feasible. In addition the invention relates to a structured light bar code pattern for use in the three dimensional vision device and method.
2. Description of the Prior Art
Previous machine vision techniques, for example those used to map a three dimensional surface, have typically attempted to employ a stereoscopic system in one of two classes. The first class includes systems that combine the images from two cameras some finite distance apart, mimicking human vision.
The second class includes systems that comprise a projector and camera arrangement, again some distance apart, where the projector casts a structured light image onto the surface to be mapped, and the camera images the surface. The deformation of the structured light image from the point of view of the camera is caused by the contour of the surface. From these deformations, the position of the surface in three dimensional space can be calculated.
Both classes of machine vision have difficulty in reconciling the two points of view into information about the third dimension. For example, in the case of a two-camera system, it is difficult to determine the correspondence between the two images. To solve this problem, feature recognition algorithms have been developed which can, with some degree of success, identify and match corresponding features of the two images. These algorithms, however, typically produce errors of at least xc2x11 pixel, which may be acceptable for some applications, but not for all. This scheme also cannot work for a featureless three dimensional surface.
For projector-camera systems, the problem of determining correspondence between a given projected pixel and its image on the three dimensional surface also exists. Previous systems using structured light suffered because extraneous light xe2x80x9cnoisexe2x80x9d from nearby camera pixels compromised the data, since the light on adjacent pixels is closely correlated (for example, sine wave grayscale). Structured light in two dimensional patterns such as uniform grids require the same feature recognition of the two camera systems to locate the grid vertices, resulting in pixel errors. Further, as will be shown, only one dimensional structured light is required, given a two dimensional camera, to accurately locate the position of the mapped surface in three dimensional space. The second dimension of the light pattern is superfluous.
In addition, for most of the prior art systems sub-pixel resolution has proven difficult or impossible.
A full discussion of various Prior Art systems can be found in Battle, et al., Recent Progress in Coded Structured Light as a Technique to Solve the Correspondence Problem: A Survey, 7 Pattern Recognition 963, 963-982 (1998).
It is an object of the present invention to provide a system and method of accurately mapping a three dimensional surface which overcomes the deficiencies of the prior art.
Specifically, it is an object of the present invention to provide a system and method of accurately mapping a three dimensional surface which is immune to the effects of xe2x80x9cnoisexe2x80x9d from nearby pixels.
It is another object of the present invention to provide a system and method of accurately mapping a three dimensional surface which enables the use of simple and efficient calculation techniques.
It is another object of the present invention to provide a system and method of accurately mapping a three dimensional surface which can quickly perform the mapping function.
It is another object of the present invention to provide a system and method of accurately mapping a three dimensional surface which can achieve accurate sub-pixel resolution.
It is another object of the present invention to provide a system and method of accurately mapping a three dimensional surface which enables the use of common components for both projection and image capture.
It is another object of the present invention to provide a system and method of accurately mapping a three dimensional surface which can be economically mass-produced for commercial exploitation.
It is another object of the present invention to provide a structured light bar code pattern that enables the above objects to be achieved.
The system of the present invention comprises a projector and camera. The projector casts an image of structured light on the surface to be mapped. The structured light is a bar code, having bars of equal width, each light or dark according to a quadratic residue formula. The structured light may be created passively, as with a mask, or actively, as with a laser emitter and rotating polygon mirror. The camera then images the surface. The projected image is shifted, and the process is repeated a number of times, according to the particular arrangement selected for the structured light. The image data collected from this series of images is then processed to determine the correspondence of each camera pixel to the bar of the structured light that overlays the scene at each pixel. Knowing this correspondence, the location of the image within each camera pixel in three dimensional space can be triangulated, even to sub-pixel accuracy.